Readme for Replication Materials to "Dynamic effects of electoral laws" 

For additional information about measurement, please see the article and Supplementary Information. 

There are separate replication files for New Zealand (NZ_Analysis.R) and Norway (NO_Analysis.R).  To make them work, users must do the following:

1) Install the Synth and plyr libraries (i.e. run the following: install.packages("Synth"); install.packages("plyr"))
2) Set working directory to the folder where replication materials are located.  
3) Source the "SynthFunctions.R" script in the "Code" folder.  (Code to do this is included in both replication files before any data is read in but after the working directory is set.) 

To replicate plots from the main text or the Supplementary Information, users must first run the relevant analyses in "NO_Analysis.R" or "NZ_Analysis.R", and then run the plotting functions in "Plotting.R". 

Please note that "Plotting.R" also relies on functions found in "SynthFunctions.R" 

The "Plotting.R" script will write PDFs of all plots into the replication materials folder, rather than simply creating plots in R.  To remove this behavior, users can comment out all calls to "pdf()" in the script. 

Replication materials were created using R version 3.5.1, Synth version 1.1-5, and plyr version 1.8.4 on MacOS version 10.14.2.

In the case of problems with these replication materials or questions, please contact the author at dalston.ward@gess.ethz.ch




 